import { defineStore } from 'pinia'

export const useDictStore = defineStore('dict', {
    state: () => ({
        pageArray: [10, 20, 30, 50],
        defaultPageSize: 10,
        dictData: {
            sf: [
                { label: '是', value: '0' },
                { label: '否', value: '1' }
            ],
            status: [
                { label: '正常', value: '0' },
                { label: '停止', value: '1' }
            ]
        }
    }),

    actions: {
        getDict(type) {
            return this.dictData[type] || []
        }
    }
}) 